import { getAction, deleteAction, putAction, postAction, postFormData,httpAction,postActionBlob } from '@/api/manage'
const gateway = '/api/gateway'

const addUserList = (params) => postAction( '/jic-backend-pos/pos/theme/permission/emp', params) // 权限管理-人员管理-新增人员列表
const userList = (params) => postAction(gateway + '/jic-backend-pos/pos/theme/permission/emp/role', params) // 权限管理-人员管理-员工列表
const roleList = (params) => postAction(gateway + '/jic-backend-pos/pos/theme/permission/role/list', params) // 搜索——角色列表
const editUserRole = (params) => postAction(gateway + '/jic-backend-pos/pos/theme/permission/emp/createUpdate', params) // 员工角色 新增-修改
const deleteUserRole = (params) => postAction(gateway + `/jic-backend-pos/pos/theme/permission/emp/del?id=${params}`, params) // 员工 删除

const roleDetail = (params) => postAction(gateway + `/jic-backend-pos/pos/theme/permission/role?roleId=${params}`, {}) // 角色管理-详情
const themeClassify = (params) => postAction(gateway + `/jic-backend-pos/pos/theme/classify/listAll?status=${params}`, {}) // 角色管理-详情-素材分类
const themeClassify2 = (params) => postAction(gateway + '/jic-backend-pos/pos/theme/classify/listAll', params) // 角色管理-详情-素材分类
const areaList = (params) => postAction(gateway + '/sdk-store/store/areas', params) // 角色管理-详情-素材区域
const nodeList = (params) => postAction(gateway + '/jic-backend-pos/pos/theme/approvalNode/list', params) // 角色管理-详情-审核节点
const roleEdit = (params) => postAction(gateway + '/jic-backend-pos/pos/theme/permission/role/update', params) // 角色管理-角色修改
const roleAdd = (params) => postAction(gateway + '/jic-backend-pos/pos/theme/permission/role/createUpdate', params) // 角色管理-角色修改/新增


const copyrightList = (params) => postAction(gateway + '/jic-backend-pos/pos/theme/copyrights/page', params) // 获取版权分页
const editCopyright = (params) => postAction(gateway + '/jic-backend-pos/pos/theme/copyrights/edit', params) // 新增|编辑版权信息
const deleteCopyright = (params) => postAction(gateway + '/jic-backend-pos/pos/theme/copyrights/delete', params) // 删除版权信息

// const userListAddRole = (params) => getAction('/sys/user/list', params) // 员工列表-新增-列表
const userListAddRole = (params) => getAction('/sys/api/querySysUserList', params) // 员工列表-新增-列表

const recordList = (params) => postAction(`/jic-backend-pos/pos/theme/approval/log?themeId=${params}`, {}) // 审核记录
const copyRightDetail = (params) => postAction('/jic-backend-pos/pos/theme/copyrights/detail', params) // 审核记录
const rejectReason = (params) => postAction('/jic-backend-pos/pos/theme/approval/rejectReason/list', params) // 审核驳回理由

const confirmReply = (params) => postAction(gateway+'/pos-center/theme/v2/approval/confirm', params) // 创建者确认回复
export {
    userList,
    addUserList,
    roleList,
    editUserRole,
    deleteUserRole,
    roleDetail,
    themeClassify,
    themeClassify2,
    areaList,
    nodeList,
    roleEdit,
    roleAdd,
    copyrightList,
    editCopyright,
    deleteCopyright,
    userListAddRole,
    recordList,
    copyRightDetail,
    rejectReason,
    confirmReply
}